home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / msdos / lynx / source / doslynx / src / textatt2.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-25  |  1.6 KB  |  47 lines

  1. //    Copyright (c) 1994, University of Kansas, All Rights Reserved
  2. //
  3. //    Class:        TextAttribute
  4. //    Include File:    textattr.h
  5. //    Purpose:    Implement a way of giving a WWW style of attribute to
  6. //            a segment of a stream of data.
  7. //    Remarks/Portability/Dependencies/Restrictions:
  8. //        The difference between the start and end of an attribute is
  9. //        called extent.  Extent can be considered a correlation to
  10. //        calling strlen on a string.
  11. //        An extent of 0 means no duration, 1 means 1 byte, etc...
  12. //        A negative extent is equivalent to 0 extent.
  13. //        Once an attribute type is set by the constructor, it can
  14. //        never be changed.
  15. //    Revision History:
  16. //        02-01-94    created
  17. //        02-09-94    Split all members into seperate files.
  18. #include"textattr.h"
  19.  
  20. TextAttribute::TextAttribute(const signed long int sli_Offset, const signed
  21.     long int sli_OffsetPlusExtent, const signed short int ssi_index)
  22. {
  23. //    Purpose:    Construct a TextAttribute object defaulting to a
  24. //            paragraph.
  25. //    Arguments:    sli_Offset        The offset of the text
  26. //                        attribute in a stream.
  27. //            sli_OffsetPlusExtent    The ending of the attribute
  28. //                        in a stream.
  29. //    Return Value:    none
  30. //    Remarks/Portability/Dependencies/Restrictions:
  31. //        Defaults to a paragraph attribute.
  32. //    Revision History:
  33. //        02-01-94    created
  34. //        02-17-94    Added an index to the paragraphs.
  35. //                Retrieving the indexOf in a TNSCollection
  36. //                does not work in some cases.
  37.  
  38.     //    Set the offset.
  39.     sli_StreamOffset = sli_Offset;
  40.     //    Set the extent.
  41.     sli_StreamExtent = sli_OffsetPlusExtent;
  42.     //    Set the type.
  43.     AT_StreamType = paragraph;
  44.     //    Set the attribute structure pointer.
  45.     ssi_ccIndex = ssi_index;
  46. }
  47.